#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @Project : chat_model 
# @File    : vector_store.py
# @IDE     : PyCharm 
# @Author  :ZH
# @Time    : 2025/1/10 13:11
from fastapi import Security

from apps.api.v1.vector_store_api import vector_store_router
from apps.api.v1.vector_store_api.schema import VectorStoreListRequests
from apps.models import User
from apps.utils import get_current_user
from apps import logic


@vector_store_router.post('/list', name='分页获取可用存储向量的介质')
async def vector_store_list(
        *,
        user: User = Security(get_current_user),
        query: VectorStoreListRequests
):
    count, data = await logic.vector_store_logic.vector_store_list(query=query)
    return {
        'code': 0,
        "message": "成功",
        "count": count,
        "data": data
    }



